<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
get_header();
?>
<?php

echo '<h2>Hľadanie</h2>';
?>
<form method="get" id="innersearchform" action="<?php bloginfo('home'); ?>/">
<div>
    <span><?php _e('Search');?></span>
    <input type="text" size="18" value="<?php echo wp_specialchars($s, 1)?>" name="s" id="inners"/>
<input type="submit" id="innersearchsubmit" value="OK" class="btn" />
</div>
</form>
<?php
echo '<p style="text-align: center">Výsledky hľadania pre "<b>'.wp_specialchars($s, 1).'</b>"</p>';

if (have_posts()) {
    while (have_posts()) {
        echo '<div class="index-post-item">';
        the_post();
        echo '<div class="index-post-item-imgwrap">';
        jr_post_image($id);
        echo '</div>';
        $timeStamp = get_post_time();
        $monthYear = date('M y', $timeStamp);
        $day = date('d', $timeStamp);
        echo '<div class="index-post-item-title-wrapper">';
        echo '<span class="index-post-item-date">';
        echo $monthYear.'<p>'.$day.'</p>';
        echo '</span>';
        echo '<a href="'.get_permalink($id).'" class="index-post-item-title">';
        the_title();
        echo '</a>';
        echo '<span class="index-post-item-details">autor: <b>';
        the_author();
        echo '</b>&nbsp;&nbsp;prečítané: <b>';
        the_views();
        echo '</b></span>';
        echo '</div>';
        echo '<span class="index-post-item-excerpt">';
        the_excerpt();
        echo '</span>';
        echo '<div class="index-post-item-spacer">&nbsp;</div>';
        echo '</div>';

        echo '<div class="index-delimeter">&nbsp;</div>';
    }
    echo '<div id="navigation">';
    posts_nav_link();
    echo '</div>';
}

?>
<?php
get_footer();
?>